package com.xc.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xc.common.ServerResponse;
import com.xc.dao.SiteSmsLogMapper;
import com.xc.service.ISiteSmsLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author mipha
 * @version 1.0
 * @date 2019/2/16 2:58 PM
 */
@Service("iSiteSmsLogService")
public class SiteSmsLogServiceImpl implements ISiteSmsLogService {
    @Autowired
    SiteSmsLogMapper siteSmsLogMapper;

    @Override
    public ServerResponse smsList(String phoneNum, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List smslist = siteSmsLogMapper.smsList(phoneNum);
        PageInfo pageInfo = new PageInfo(smslist);
        return ServerResponse.createBySuccess(pageInfo);
    }


}
